﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine.SceneManagement;
using UnityEngine;

public class LevelManager : BaseManager<LevelManager>
{

    public int NowLevel = 1;


    public void ToLoading()
    {
        SceneManager.LoadScene("Loading");
    }

    void Loading(Scene scene, LoadSceneMode loadSceneMode)
    {
        GetComponent<AudioPro>().ChangeAudio
            (Resources.Load<AudioClip>("Sounds/" + scene.name));
        if(scene.name=="Loading")
        {
            
        }
    }

    protected override void OnMyEvent(EVENT_TYPE Event_Type, Component Sender, object Param = null)
    {

    }

    private void Awake()
    {
        base.Awake();
        SceneManager.sceneLoaded += Loading;
    }

}
